package com.qumall.boot.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qumall.boot.common.Result;
import com.qumall.boot.entity.User;
import com.qumall.boot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {


    @Autowired
    private UserService userService;


    @GetMapping("/list")
    public Result list(){
        return  Result.success(userService.list());
    }

    @PostMapping("/login")
    public Result login(@RequestBody User user) {




        return Result.success(userService.login(user));

    }



}
